package com.chenchao.designer.abstractFactory;

/**
 * @encoding : UTF-8
 * @Time : 2020/11/14 14:52
 * @Author : Chen Chao
 * @File : javaSE.com.chenchao.javadesigner.abstractFactory.FactoryImpl.java
 * @Software : IntelliJ IDEA
 * @since : 1.8
 * 优点：同一工厂可以生成多个大类产品
 * 缺点：新增大类同样违反开闭原则
 */
public class HuaweiFactoryImpl implements Factory {
    @Override
    public Cpu getCpu() {
        return new Cpu.CpuImpl1();
    }

    @Override
    public Screen getScreen() {
        return new Screen.ScreenImpl1();
    }
}
